<div class="col-md-12">
  <!-- BOX -->
  <div class="box">
    <div class="box-body">
      <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
      	<div class="row">
          <div class="col-md-9 top10">
        	  <!--搜索-->
            <div class="col-md-4 nopadding-left">
        	    <div class="input-group">
                {{input class="form-control" type="text" placeholder="搜索" value=queryCondition enter="search"}}
      	        <span class="input-group-btn">
        		      <button class="btn btn-primary btn-reduce" type="button" style="touch-action: manipulation; -ms-touch-action: manipulation;" {{action "search" on="click"}}>
                    <i class="fa fa-search"></i>
                  </button>
      	        </span>
        	    </div>
        	  </div>
        	  <!--搜索-->
        </div>
          <div class="user-add-btn col-md-3">
            {{#ui/mix-button class="user-btn pull-right" iconClass="fa-plus"  text='添加'  clickAction="toDetailPage" toDetailPage="toDetailPage"}}
            {{/ui/mix-button}}
          </div>
      	</div>
        <table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable" aria-describedby="datatable1_info">
          <thead>
            <tr role="row">
							<th rowspan="1" colspan="1" width="">机构名称</th>
              <th rowspan="1" colspan="1" width="">机构地址</th>
              <th rowspan="1" colspan="1" width="">电话</th>
							<th rowspan="1" colspan="1" width="">法人</th>
              <th rowspan="1" colspan="1" width="">状态</th>
              <th rowspan="1" colspan="1" width="">操作</th>
              <th rowspan="1" colspan="1" width="">权限分配</th>
            </tr>
          </thead>
          <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
            {{#each tenantList as |tenant|}}
						<tr >
							<td {{action "toDetailPage" tenant on="click"}} class="ellipsis">{{tenant.orgName}}</td>
              <td {{action "toDetailPage" tenant on="click"}} class="ellipsis hidden-xs">{{tenant.address}}</td>
							<td {{action "toDetailPage" tenant on="click"}} class="ellipsis">{{tenant.orgTel}}</td>
							<td {{action "toDetailPage" tenant on="click"}} class="ellipsis hidden-xs">{{tenant.legalPerson}}</td>
							<td {{action "toDetailPage" tenant on="click"}} class="ellipsis hidden-xs">{{tenant.status.typename}}</td>
              <td class="ellipsis hidden-xs">
                <button {{action "toEquipTypePage" tenant}}>方案类型分配</button>
              </td>
              <td class="ellipsis hidden-xs">
                {{#if (eq tenant.status.typecode 'tenantStatusReleased') }}
                  <button {{action "toAssignPermissions" tenant}}>机构权限分配</button>
                    {{else}}
                        <h1 class="col-sm-12 center unTask"></h1>
                {{/if}}
              </td>
						</tr>
            {{/each}}
          </tbody>
        </table>
        {{#if tenantList }}
            {{page-numbers content=tenantList showFL=true numPagesToShow=5}}
            {{else}}
                <h1 class="col-sm-12 center unTask"></h1>
        {{/if}}
      </div>
    </div>
  </div>
  <!-- /BOX -->
</div>

{{#if showpopInvitePassModal}}
	{{#bs-modal body=false footer=false header=false closedAction=(action "invitation")}}
  {{#bs-modal-header}}
    <h3 class="modal-title">权限分配</h3>
  {{/bs-modal-header}}
  {{#bs-modal-body}}
    <h3 class="modal-title center">是否分配全部机构权限？</h3>
  {{/bs-modal-body}}

  {{#bs-modal-footer class="user-add-btn audit"}}
    {{#ui/mix-button class="pass-btn" iconClass="fa fa-check"  text='全部分配' clickAction="saveTenantPrivilege" saveTenantPrivilege="saveTenantPrivilege" }}
    {{/ui/mix-button}}
    {{#ui/mix-button class="reject-btn " iconClass="fa fa-times"  text='自定义分配' clickAction="toCustomize" toCustomize="toCustomize"}}
    {{/ui/mix-button}}
    {{#ui/mix-button class="privilege-btn" iconClass="fa fa-undo" text='取消' clickAction="recall" recall="recall" }}
    {{/ui/mix-button}}
  {{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}
